package com.ganbo.ms.java8.lambda;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.function.Supplier;

/**
 * @author ganbo
 * @date 2022/12/14 20:20
 */
public class SupplierDemo1 {


    public static void main(String[] args) {
        printArrayMin(() -> {
            int[] arr = {123, 23, 234, 22, 6666};
            Arrays.sort(arr);
            return arr[0];
        });
    }


    public static void printArrayMin(Supplier<Integer> supplier) {
        System.out.println("aaa");
        Integer max = supplier.get();
        System.out.println("max====>" + max);
    }
}
